<template>
    <div class="box">
        <van-nav-bar title="搜索" left-text="" left-arrow @click-left="onClickLeft" />

        <div class="main" v-for="(v,i) in getlist" :key="i">
            <van-card :num="v.goods_number" :price="v.goods_price" :title="v.goods_name"
                :thumb="v.goods_small_logo?v.goods_small_logo:'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'"/>
        </div>

    </div>
</template>

<script setup>

import { ref } from "vue"

let getlist = ref([])

import { searchApi } from "@/api/api";

const searchList = () => {
    searchApi().then((res) => {
        console.log(res)
        getlist.value = res.data.message.goods
    })
}
searchList()
</script>

<style lang="scss" scoped></style>